package com.zx.cloud.controller.client;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.zx.cloud.Shift;
import com.zx.cloud.controller.StatusCode;
import com.zx.cloud.domain.Client;
import com.zx.cloud.domain.ClientLoanOrder;
import com.zx.cloud.domain.Dict;
import com.zx.cloud.domain.Edition;
import com.zx.cloud.domain.LianLianParam;
import com.zx.cloud.domain.LoanOrder;
import com.zx.cloud.domain.RepayOrder;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

/**
 * 
 * @ClassName: LoanClientFallback
 * @Description: 
 * @author: likun
 * @date: 2017年11月1日 下午6:55:28
 */
@Component
public class LoanClientFallback implements LoanClient {
	
    private static final Logger LOGGER = LoggerFactory.getLogger(LoanClientFallback.class);
    private void didNotGetResponse() {
        LOGGER.error("service '{}' has become unreachable", ProviderClient.SERVICE_ID);
    }
    @Override
	public ObjectDataResponse<List<Dict>> getDitRate() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Integer> createLoanOrder(LoanOrder loanOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return new ObjectDataResponse<Integer>(1);
	}
	@Override
	public ObjectDataResponse<Page<LoanOrder>> getMyLoanOrderList(
			LoanOrder loanOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<LoanOrder> getLoanOrderDetail(LoanOrder loanOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Edition> getAppVersionToAndr() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<RepayOrder> getRepayOrderDetail(RepayOrder repayOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Page<RepayOrder>> getMyRepayOrderList(RepayOrder repayOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<List<Dict>> getIosCheck() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Integer> whetherCanLoan(LoanOrder loanOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Integer> saveTradeInfoByRepay(RepayOrder repayOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<String> getTradeNum(RepayOrder repayOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<Edition> getAppVersionToIos() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<LianLianParam> getLianLianParam() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<ClientLoanOrder> getClientLoanOrder(
			ClientLoanOrder cLoanOrder) {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	@Override
	public ObjectDataResponse<String> getPaymentSwitch() {
		didNotGetResponse();
		Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}
	

   
}
